<%@page import="cn.school.service.Service3"%>
<%@page import="java.text.*"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="cn.school.dao.*,cn.school.entity.*" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<%
request.setCharacterEncoding("utf-8");
String subjectname=request.getParameter("subjectname");
String gradeid=request.getParameter("gardeid");
int gradeid1=Integer.parseInt(gradeid);
String classhour=request.getParameter("classhour");
int classhour1=Integer.parseInt(classhour);
Service3 service=new Service3();
Subject s=new Subject();
s.setSubjectName(subjectname);
s.setGradeId(gradeid1);
s.setClassHour(classhour1);

int i=service.add(s);
out.print("增加了"+i+"行"); 
%>
</body>
</html>